home *** CD-ROM | disk | FTP | other *** search
/ Safarir 3 / SafTV-CD3.iso / pc / Bonus / Dessins Animés / static / jeux / napman.swf / scripts / frame_324 / DoAction.as
Text File  |  2001-11-21  |  2KB  |  123 lines

  1. iter = "-1";
  2. while(iter < status)
  3. {
  4.    px4 = int(px / "4");
  5.    py4 = int(py / "4");
  6.    cosa = eval("r" add py4).substr(px4 + "1","1");
  7.    if(cosa eq "." or cosa eq "o")
  8.    {
  9.       punti -= "1";
  10.       score += "10";
  11.       removeMovieClip("p_" add px4 add "_" add py4);
  12.       set("r" add py4,eval("r" add py4).substr("1",px4) add "-" add eval("r" add py4).substr(px4 + "2","29" - px4));
  13.       tellTarget("/suoni")
  14.       {
  15.          gotoAndStop("bip");
  16.          play();
  17.       }
  18.    }
  19.    if(cosa eq "o")
  20.    {
  21.       timer = int("160" - level * "3");
  22.       score += "50";
  23.       status = "1";
  24.       tellTarget("/suoni")
  25.       {
  26.          gotoAndStop("pillola");
  27.          play();
  28.       }
  29.    }
  30.    if(cosa eq "R")
  31.    {
  32.       px = "4";
  33.    }
  34.    if(cosa eq "T")
  35.    {
  36.       px = "104";
  37.    }
  38.    restox = px - px4 * "4";
  39.    restoy = py - py4 * "4";
  40.    if(restox == "0")
  41.    {
  42.       call("ruota");
  43.       vx = svx;
  44.    }
  45.    if(restoy == "0")
  46.    {
  47.       vy = svy;
  48.    }
  49.    prev_x = getProperty("/pacman", _X);
  50.    prev_y = getProperty("/pacman", _Y);
  51.    setProperty("/pacman", _X, px * "4" + "8");
  52.    setProperty("/pacman", _Y, py * "4" + "8");
  53.    if(vx == "1")
  54.    {
  55.       pros = "3";
  56.    }
  57.    else
  58.    {
  59.       pros = "0";
  60.    }
  61.    if(vy == "1")
  62.    {
  63.       prosy = "3";
  64.    }
  65.    else
  66.    {
  67.       prosy = "0";
  68.    }
  69.    tpx = px + vx + pros;
  70.    tpy = py + vy + prosy;
  71.    cosa = eval("r" add int(tpy / "4")).substr(int(tpx / "4") + "1","1");
  72.    if(cosa ne "X")
  73.    {
  74.       px += vx;
  75.       py += vy;
  76.    }
  77.    iter += "1";
  78. }
  79. fanta = "1";
  80. call("fanta1");
  81. fanta = "2";
  82. call("fanta2");
  83. fanta = "3";
  84. call("fanta3");
  85. fanta = "4";
  86. call("fanta4");
  87. if(punti == "122" and bonus == "0")
  88. {
  89.    if(level < "10")
  90.    {
  91.       tellTarget("/bonus")
  92.       {
  93.          gotoAndStop(eval("/:level"));
  94.       }
  95.    }
  96.    else
  97.    {
  98.       tellTarget("/bonus")
  99.       {
  100.          gotoAndStop(10);
  101.       }
  102.    }
  103.    setProperty("/bonus", _visible, "1");
  104.    bonus = "1";
  105.    timerbonus = "100";
  106.    tellTarget("/suoni")
  107.    {
  108.       gotoAndStop("bonus");
  109.       play();
  110.    }
  111. }
  112. if(px == "54" and py == "68" and bonus == "1")
  113. {
  114.    bonus = "2";
  115.    setProperty("/bonus", _visible, "0");
  116.    score = score + "900" + "200" * level;
  117.    tellTarget("/suoni")
  118.    {
  119.       gotoAndStop("bonusok");
  120.       play();
  121.    }
  122. }
  123.